package com.vunguyen.model;
// Generated Dec 28, 2014 10:51:48 PM by Hibernate Tools 3.6.0


import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Phancongcongvanden generated by hbm2java
 */
@Entity
@Table(name="phancongcongvanden"
    ,catalog="qlkhoacntt"
)
public class Phancongcongvanden  implements java.io.Serializable {


     private Integer idPhanCong;
     private Congvanden congvanden;
     private Date ngayPhanCong;
     private Date hanCuoi;
     private int xacNhanHoanTat;
     private String nguoiPhanCong;
     private int xacNhanBcn;
     private PhancongcongvandenGiangvien phancongcongvandenGiangvien;
     private PhancongcongvandenBomon phancongcongvandenBomon;

    public Phancongcongvanden() {
    }

	
    public Phancongcongvanden(Congvanden congvanden, Date ngayPhanCong, Date hanCuoi, int xacNhanHoanTat, String nguoiPhanCong, int xacNhanBcn) {
        this.congvanden = congvanden;
        this.ngayPhanCong = ngayPhanCong;
        this.hanCuoi = hanCuoi;
        this.xacNhanHoanTat = xacNhanHoanTat;
        this.nguoiPhanCong = nguoiPhanCong;
        this.xacNhanBcn = xacNhanBcn;
    }
    public Phancongcongvanden(Congvanden congvanden, Date ngayPhanCong, Date hanCuoi, int xacNhanHoanTat, String nguoiPhanCong, int xacNhanBcn, PhancongcongvandenGiangvien phancongcongvandenGiangvien, PhancongcongvandenBomon phancongcongvandenBomon) {
       this.congvanden = congvanden;
       this.ngayPhanCong = ngayPhanCong;
       this.hanCuoi = hanCuoi;
       this.xacNhanHoanTat = xacNhanHoanTat;
       this.nguoiPhanCong = nguoiPhanCong;
       this.xacNhanBcn = xacNhanBcn;
       this.phancongcongvandenGiangvien = phancongcongvandenGiangvien;
       this.phancongcongvandenBomon = phancongcongvandenBomon;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)

    
    @Column(name="idPhanCong", unique=true, nullable=false)
    public Integer getIdPhanCong() {
        return this.idPhanCong;
    }
    
    public void setIdPhanCong(Integer idPhanCong) {
        this.idPhanCong = idPhanCong;
    }

@ManyToOne(fetch=FetchType.EAGER)
    @JoinColumn(name="idCongVanDen", nullable=false)
    public Congvanden getCongvanden() {
        return this.congvanden;
    }
    
    public void setCongvanden(Congvanden congvanden) {
        this.congvanden = congvanden;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="NgayPhanCong", nullable=false, length=10)
    public Date getNgayPhanCong() {
        return this.ngayPhanCong;
    }
    
    public void setNgayPhanCong(Date ngayPhanCong) {
        this.ngayPhanCong = ngayPhanCong;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="HanCuoi", nullable=false, length=10)
    public Date getHanCuoi() {
        return this.hanCuoi;
    }
    
    public void setHanCuoi(Date hanCuoi) {
        this.hanCuoi = hanCuoi;
    }

    
    @Column(name="XacNhanHoanTat", nullable=false)
    public int getXacNhanHoanTat() {
        return this.xacNhanHoanTat;
    }
    
    public void setXacNhanHoanTat(int xacNhanHoanTat) {
        this.xacNhanHoanTat = xacNhanHoanTat;
    }

    
    @Column(name="NguoiPhanCong", nullable=false, length=20)
    public String getNguoiPhanCong() {
        return this.nguoiPhanCong;
    }
    
    public void setNguoiPhanCong(String nguoiPhanCong) {
        this.nguoiPhanCong = nguoiPhanCong;
    }

    
    @Column(name="XacNhanBCN", nullable=false)
    public int getXacNhanBcn() {
        return this.xacNhanBcn;
    }
    
    public void setXacNhanBcn(int xacNhanBcn) {
        this.xacNhanBcn = xacNhanBcn;
    }

@OneToOne(fetch=FetchType.EAGER, mappedBy="phancongcongvanden")
    public PhancongcongvandenGiangvien getPhancongcongvandenGiangvien() {
        return this.phancongcongvandenGiangvien;
    }
    
    public void setPhancongcongvandenGiangvien(PhancongcongvandenGiangvien phancongcongvandenGiangvien) {
        this.phancongcongvandenGiangvien = phancongcongvandenGiangvien;
    }

@OneToOne(fetch=FetchType.EAGER, mappedBy="phancongcongvanden")
    public PhancongcongvandenBomon getPhancongcongvandenBomon() {
        return this.phancongcongvandenBomon;
    }
    
    public void setPhancongcongvandenBomon(PhancongcongvandenBomon phancongcongvandenBomon) {
        this.phancongcongvandenBomon = phancongcongvandenBomon;
    }




}


